<?php

namespace view;

class Time
{
	
	public function viewTime()
	{
		
		$dayofweek = date("N");
			switch ($dayofweek)
			{
			case "1":
			  $dayofweek= "Måndag";
			  break;
			case "2":
			 $dayofweek= "Tisdag";
			  break;
			case "3":
			  $dayofweek= "Onsdag";
			  break;
			case "4":
			  $dayofweek= "Torsdag";
			  break;
			case "5":
			  $dayofweek= "Fredag";
			  break;
			case "6":
			 $dayofweek= "Lördag";
			  break;
			case "7":
			 $dayofweek= "Söndag";
			  break;
			default:
			  $dayofweek= "Veckodag";
			}
		$dayofmonth = date("d");
		$month = date("m");
		switch ($month)
			{
			case "1":
			  $month= "Januari";
			  break;
			case "2":
			 $month= "Februari";
			  break;
			case "3":
			  $month= "Mars";
			  break;
			case "4":
			  $month= "April";
			  break;
			case "5":
			  $month= "Maj";
			  break;
			case "6":
			 $month= "Juni";
			  break;
			case "7":
			 $month= "Juli";
			  break;
  			case "8":
			  $month= "Agusti";
			  break;
			case "9":
			  $month= "September";
			  break;
			case "10":
			  $month= "Oktober";
			  break;
			case "11":
			 $month= "November";
			  break;
			case "12":
			 $month= "December";
			  break;
			default:
			  $month= "Månad";
			}
		$year = date("Y");
		$time = date("H:i:s");
		return "$dayofweek, den $dayofmonth $month år $year. Klockan är [$time].";
	}
	
	
}

